
<?php

mysql_connect('localhost','root','') or die(mysql_error());

mysql_select_db('mb120')or die(mysql_error());


$query = "SELECT * FROM `countries`";

$result = mysql_query($query) or die(mysql_error());

var_dump($result);
#mysql_fetch_array
while($ans = mysql_fetch_array($result)){
  print_r($ans);
  echo "Name is ".$ans[1]." \n";
  echo "Name is ".$ans['name']." \n\n";
}
